package com.itheima.consumer.config;

import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConsumerConfig {
    @Bean
    public ApplicationConfig applicationConfig(){
        ApplicationConfig applicationConfig =new ApplicationConfig();
        applicationConfig.setName("consumer");
        return applicationConfig;
    }
    @Bean
    public RegistryConfig registryConfig (){
        RegistryConfig registryConfig =new RegistryConfig();
        registryConfig.setAddress("zookeeper://127.0.0.1:2181");
        return registryConfig;
    }
/*
* # Dubbo 配置
# 注册中心、服务名称、dubbo协议、扫描包
dubbo:
  application:
    name: consumer
  registry:
    address: zookeeper://127.0.0.1:2181*/
}
